package timbap.visualizer.api.plugin.container;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import timbap.visualizer.api.plugin.Plugin;

/**
 * The <code>AbstractPluginFork</code> provides a common base
 * implementation of the <code>PluginFork</code> interface
 * that should be used by all timbap plugins that fork to
 * various other timbap plugins.
 *
 * @author  Andreas Pabst
 * @see     timbap.visualizer.api.plugin.container.PluginFork
 * @see     timbap.visualizer.api.plugin.container.AbstractPluginContainer
 */
public abstract class AbstractPluginFork extends AbstractPluginContainer implements PluginFork {

	private static final Log LOG = LogFactory.getLog(AbstractPluginFork.class);

    @Override
    public void activate() {
        super.activate();
        for (Plugin tPlugin: getPlugins()) {
            tPlugin.activate();
        }
        if (LOG.isDebugEnabled()) {
            LOG.debug("All plugins of plugin fork " + this + " activated.");
        }
    }
    
}
